package com.diaohw.module.system.obj.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "用户")
@Table("ACCOUNT_ROLE")
public class AccountRole implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 账号
     */
    @Column("ACCOUNT_ID")
    @Schema(description = "账号")
    private String accountId;

    /**
     * 账号
     */
    @Column("ROLE_ID")
    @Schema(description = "账号")
    private String roleId;

    public static AccountRole of(String accountId, String roleId) {
        AccountRole ar = new AccountRole();
        ar.accountId = accountId;
        ar.roleId = roleId;
        return ar;
    }
}
